package cn.codeforfun.controller;

import cn.codeforfun.webservice.MathService;
import cn.codeforfun.webservice.MathService_Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Package cn.codeforfun.controller
 * Project springboot-webservice-demo
 * Author Bin.Wang
 * Created on 2017/4/13 15:43
 * version 1.0.0
 */
@RestController
@RequestMapping("/test")
public class TestController {
  @RequestMapping("/add")
  public Integer add(Integer a, Integer b) {
    MathService_Service service_service = new MathService_Service();
    MathService mathServicePort = service_service.getMathServicePort();
    return mathServicePort.add(a, b);
  }

  @RequestMapping("/addHello")
  public String addHello(String param) {
    MathService_Service service_service = new MathService_Service();
    MathService mathServicePort = service_service.getMathServicePort();
    return mathServicePort.addHello(param);
  }
}
